1. Field of the Invention
The present invention relates to a distance measuring apparatus and to a method for measuring a distance from the apparatus to an object by emitting light which passes through a slit, taking an image obtained by light reflected by the object, and referring to a positional relationship between the light emitting position and the image taking position.
2. Description of the Related Art
Recently, CCD cameras and computer image processing techniques have been improved, and accordingly, three-dimensional measurement methods using images have become common. An example of such three-dimensional measurement methods using a CCD camera and the computer image processing is a light-section method. In the light-section method, a light beam passing through a slit or having a beam form obtained by passing through a slit is projected onto a target object to be measured, so as to virtually cut the object using a band-shaped light and a cut surface is observed in a direction other than the direction of the projected light beam. Here, owing to the laser technique, very fine and intense light beams can be obtained. Therefore, even an object having an irregular surface can be measured at high speed and with high accuracy by employing the three-dimensional measurement method using the light-section method.
More specifically, in the light-section method, a light beam which passes through a slit and is emitted from a unit (i.e., distance measuring apparatus) which has a CCD camera is reflected by a surface of a target object, and an image obtained by the reflected light is taken by the CCD camera. The distance between the target object and the unit is measured based on the direction of the emitted beam and the positions of the relevant light source and the CCD camera. Therefore, in order to measure the entire portion of the target object, the light beam which passes through the slit is gradually shifted on the surface of the target object, and an image obtained by the reflected light is taken every time the light beam is shifted.
This method of taking images while shifting the light beam which passed through a slit requires a long measurement time for measuring the entire portion of an object. In order to solve this problem, a plurality of light beams which pass through slits may be emitted from the distance measuring apparatus. In this case, the shift of the light beam on the target surface is unnecessary, and the entire image of the target object can be measured through a single image-taking process. In this method, some of the light beams passing through slits may be ineffective for taking an image. Therefore, in order to specify the ineffective light beams, a specific beam width, pattern, or color is assigned to each light beam, so as to identify the light beam which was used for taking each image.
However, when a floor surface or an obstacle on a floor surface is detected using the light-section method as an optical sensor of a self-controlled robot, the distance towards the target object and the shape of the target object are unknown. Therefore, if a specific width, pattern, or color is assigned to each light beam and images are taken using reflected light beams, a large burden is imposed on the image processing. Additionally, in order to specify each of a plurality of light beams which pass through slits and have different color, a color image taken by a color camera must be processed; thus, the equipment cost is high and a bigger burden is imposed on the complicated color-image processing, and as a result, the processing time is increased. Furthermore, a device for emitting light beams which pass through slits must have a complicated mechanism for assigning a specific width, pattern, or color to each beam.
In consideration of the above circumstances, an object of the present invention is to provide a distance measuring apparatus and method for measuring the entire image of a target object by employing a light-section method with a short measurement time, without assigning any specific feature to light beams having a beam form obtained by passing through slits.
Therefore, the present invention provides a distance measuring apparatus for measuring a distance to a target object by using a light-section method, comprising:
a beam emitting device for simultaneously emitting a plurality of light beams towards the target object, each beam having a beam form obtained by passing through a slit;
a first image taking device for taking an image obtained by light reflected by the target object, where the distance between the first image taking device and the beam emitting device is relatively short so as to obtain a wide distance area;
a second image taking device for taking an image obtained by light reflected by the target object, where the distance between the first image taking device and the beam emitting device is relatively long so as to obtain a high measurement accuracy of the distance;
a distance estimating section for estimating the distance to the target object based on the image taken by the first image taking device; and
a distance determining section for determining the distance to the target object based on the estimated result output from the distance estimating section and on the image taken by the second image taking device.
Preferably, the beam emitting device is positioned between the first image taking device and the second image taking device.
Typically, the beam emitting device includes a diffraction grating for obtaining said plurality of light beams.
Also typically, said plurality of light beams are laser beams.
The beam emitting device may include a beam diffusing element for diffusing a beam in a single plane so as to have said beam form.
Typically, the beam diffusing element has a cylindrical lens.
Typically, each of the first image taking device and the second image taking device comprises an interlaced scanning CCD camera.
The present invention also provides a self-controlled robot having a distance measuring apparatus as explained above.
Typically, the self-controlled robot is a bipedal robot having two legs.
In the self-controlled robot, it is possible that:
the distance estimating section has a section for estimating the height of the target object based on the image taken by the first image taking device; and
the self-controlled robot comprises an action plan determining section for determining an action plan of the robot based on the estimated result output from the distance estimating section; and
the distance determining section has a section for determining a landing position of a leg of the robot based on the action plan, the estimated result output from the distance estimating section, and the image taken by the second image taking section.
The present invention also provides a distance measuring method of measuring a distance to a target object by using a light-section method, comprising:
a beam emitting step of simultaneously emitting a plurality of light beams towards the target object, each beam having a beam form obtained by passing through a slit;
a first image taking step of taking an image obtained by light reflected by the target object, where the distance between the point where the image is taken and the position where the beams are emitted is relatively short so as to obtain a wide distance area;
a second image taking step of taking an image obtained by light reflected by the target object, where the distance between the point where the image is taken and the position where the beams are emitted is relatively long so as to obtain a high measurement accuracy of the distance;
a distance estimating step of estimating the distance to the target object based on the image taken in the first image taking step; and
a distance determining step of determining the distance to the target object based on the estimated result obtained in the distance estimating step and on the image taken in the second image taking step.
Typically, in the method, the position where the beams are emitted is positioned between the point where the image is taken in the first image taking step and the point where the image is taken in the second image taking step.
Preferably, the beam emitting step includes a beam diffusing step of diffusing a beam in a single plane so as to have said beam form.
According to the present invention, a plurality of light beams, each beam having a beam form obtained by passing through a slit, are simultaneously emitted, rough estimation of the distance is performed based on the image taken by the first image taking device, and the distance is determined using the image taken by the second image taking device with reference to the estimated results. Therefore, in a target area, highly accurate measurement of the distance is possible within a short measurement time. In addition, the above plurality of light beams can be generated using a single light source (i.e., beam emitting device); therefore, no color image is necessary, and image data taken by non-color cameras whose brightness data are known or obtained are processed. In addition, the above plurality of light beams can be generated using the diffraction grating and the beam diffusing element such as a cylindrical lens; thus, the structure of the beam emitting device (typically, laser light source) can be simplified.